package com.syt.syteureka;

import cn.hutool.core.net.NetUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@SpringBootApplication
@EnableEurekaServer
public class SyteurekaApplication {

    public static void main(String[] args) {
        int port = 8761;
        if (!NetUtil.isUsableLocalPort(port)) {
            System.out.println("端口:" + port + "被占用了");
            System.exit(1);
        }
        SpringApplication.run(SyteurekaApplication.class, args);
    }

}
